<div class="art-post">
    <div class="art-post-tl"></div>
    <div class="art-post-tr"></div>
    <div class="art-post-bl"></div>
    <div class="art-post-br"></div>
    <div class="art-post-tc"></div>
    <div class="art-post-bc"></div>
    <div class="art-post-cl"></div>
    <div class="art-post-cr"></div>
    <div class="art-post-cc"></div>
    <div class="art-post-body">
        <div class="art-post-inner art-article">
            <h2 class="art-postheader">[Danh sách đối tác]</h2>
        <input type="button" value="Thêm đối tác mới" onclick="window.location='<?php echo Utility::getSiteUrl(); ?>/partner/add'" />

        <form action="<?php echo Utility::currentUrl(); ?>" method="post">
        <table class="item-list">
            <thead>
                <th>STT</th>
                <th>Tên đối tác</th>
                <th>Email</th>
                <th>Trạng thái</th>
                <th>Tùy chọn</th>
            </thead>
            <tbody>
                <?php
                $size = $data->getSize();
                if($size > 0)
                {
                    for($i = 0;$i < $size; $i++)
                    {
                        $row = $data->getRow($i);
                        ?>
                <tr>
                    <td><input type="checkbox" name="cb[]" value="<?php echo $row->id; ?>" /> </td>
                    <td><a href="<?php echo Utility::getSiteUrl() . '/partner/edit/' . $row->id;?>" title="Sửa"><?php echo $row->name; ?></td>
                    <td><?php echo $row->email; ?></a></td>
                    <td><?php echo ($row->status == 1)?"Kích hoạt":"Chưa kích hoạt"; ?></td>
                    <td>
                        <a href="<?php echo Utility::getSiteUrl() . '/partner/edit/' . $row->id;?>" title="Sửa" class="icon-edit"></a>
                        <a href="<?php echo Utility::getSiteUrl() . '/partner/remove/' . $row->id;?>" title="Xóa"
                           class="icon-remove"></a>
                    </td>
                </tr>
                        <?php
                    }
                    ?>
                <tr>
                    <td colspan="5">
                        <select name="mass_action">
                            <option value="">Chọn hành động</option>
                            <option value="remove">Xóa</option>
                        </select>
                        <input type="submit" name="submit" value="Thực hiện"/>
                    </td>
                </tr>
                    <?php
                }
                else
                {
                    ?>
                <tr>
                    <td colspan="5"><span class="error-notification"> Chưa có bản ghi nào</span></td>
                </tr>
                    <?php
                }
                ?>
            </tbody>
        </table>
        </form>
            
        </div>

        <div class="cleared"></div>
    </div>
</div>